//
//  LesObjCInterface.m
//  iMAME4all
//
//  Created by Les Bird on 12/1/13.
//
//

#import "LesObjCInterface.h"

@implementation LesObjCInterface

+(const char *)getBundlePath
{
	const char *userPath = [[[NSBundle mainBundle] bundlePath] cStringUsingEncoding:NSASCIIStringEncoding];
	return userPath;
}

+(const char *)getDocumentsPath
{
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
	const char *userPath = [[paths objectAtIndex:0] cStringUsingEncoding:NSASCIIStringEncoding];
	return userPath;
}

+(const char *)getRomPath
{
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
	const char *userPath = [[paths objectAtIndex:0] cStringUsingEncoding:NSASCIIStringEncoding];
    printf(userPath);
	return userPath;
}

@end

const char *getBundleFolder()
{
    return [LesObjCInterface getBundlePath];
}

const char *getDocumentsFolder()
{
    return [LesObjCInterface getDocumentsPath];
}

const char *getRomFolder()
{
    return [LesObjCInterface getRomPath];
}
